package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"order_srv/ordersrvclient"
)

type ServiceContext struct {
	Config   config.Config
	OrderSrv ordersrvclient.Ordersrv
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		OrderSrv: ordersrvclient.NewOrdersrv(zrpc.MustNewClient(c.OrderSrv)),
	}
}
